package com.ztesoft.train.ssh.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.ztesoft.train.ssh.dao.DaoInterface;
import com.ztesoft.train.ssh.model.Person;


public abstract class AbstractService implements ServiceInterface{
	protected abstract DaoInterface getDao();
	
	/* (non-Javadoc)
	 * @see com.ztesoft.train.ssh.service.PersonService#findbyEmplid(java.lang.String)
	 */
	@Override
	public Object findbyId(Object id) {
		
		return this.getDao().findbyId(id);
		
	}

	


	@Override
	public List<?> findAllEntity() {
		
		return this.getDao().findAll() ;
		
		
	}

	@Override
	@Transactional
	public void update(Object object) {
	
		this.getDao().update(object);
		
	}

	@Override
	@Transactional
	public void delete(Object object) {
		
		this.getDao().delete(object);

	}

	@Override
	@Transactional
	public void save(Object object) {
	
		this.getDao().save(object); 
		
		
	}
}
